﻿namespace Forms
{
    using Forms.My;
    using Forms.My.Resources;

    using Microsoft.VisualBasic.CompilerServices;

    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Media;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class frmProtokoll : Form
    {
        [AccessedThroughProperty("msgIcon")]
        private PictureBox _msgIcon;
        [AccessedThroughProperty("msgProt")]
        private RichTextBox _msgProt;
        [AccessedThroughProperty("msgText")]
        private Label _msgText;
        [AccessedThroughProperty("OkButton")]
        private Button _OkButton;
        [AccessedThroughProperty("ShowHideButton")]
        private Button _ShowHideButton;
        private bool Collapsed;

        [DebuggerNonUserCode]
        public frmProtokoll()
        {
            base.Load += new EventHandler(this.frmProtokoll_Load);
            this.InitializeComponent();
        }


        private void FredoCodeFormat(ref RichTextBox rtb)
        {
            if (rtb.Text.Length > 5)
            {
                int start = 0;
                int num = 0;
                string str2 = "[Filename]";
                string str = "[/Filename]";
                while (rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) != -1)
                {
                    start = rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) + str2.Length;
                    num = rtb.Find(str, start, RichTextBoxFinds.MatchCase);
                    rtb.Select(start, num - start);
                    rtb.SelectionFont = new Font("Microsoft Sans Serif", 9f, FontStyle.Bold);
                }
                rtb.Rtf = rtb.Rtf.Replace(str2, "");
                rtb.Rtf = rtb.Rtf.Replace(str, "");
                start = 0;
                num = 0;
                str2 = "[Directory]";
                str = "[/Directory]";
                while (rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) != -1)
                {
                    start = rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) + str2.Length;
                    num = rtb.Find(str, start, RichTextBoxFinds.MatchCase);
                    rtb.Select(start, num - start);
                    rtb.SelectionFont = new Font("Microsoft Sans Serif", 9f, FontStyle.Bold);
                }
                rtb.Rtf = rtb.Rtf.Replace(str2, "");
                rtb.Rtf = rtb.Rtf.Replace(str, "");
                start = 0;
                num = 0;
                str2 = "[Bank]";
                str = "[/Bank]";
                while (rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) != -1)
                {
                    start = rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) + str2.Length;
                    num = rtb.Find(str, start, RichTextBoxFinds.MatchCase);
                    rtb.Select(start, num - start);
                    rtb.SelectionColor = Color.DarkOrange;
                }
                rtb.Rtf = rtb.Rtf.Replace(str2, "");
                rtb.Rtf = rtb.Rtf.Replace(str, "");
                start = 0;
                num = 0;
                str2 = "[F1]";
                str = "[/F1]";
                while (rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) != -1)
                {
                    start = rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) + str2.Length;
                    num = rtb.Find(str, start, RichTextBoxFinds.MatchCase);
                    rtb.Select(start, num - start);
                    rtb.SelectionColor = Color.DarkBlue;
                }
                rtb.Rtf = rtb.Rtf.Replace(str2, "");
                rtb.Rtf = rtb.Rtf.Replace(str, "");
                start = 0;
                num = 0;
                str2 = "[unknown]";
                str = "[/unknown]";
                while (rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) != -1)
                {
                    start = rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) + str2.Length;
                    num = rtb.Find(str, start, RichTextBoxFinds.MatchCase);
                    rtb.Select(start, num - start);
                    rtb.SelectionColor = Color.Gray;
                }
                rtb.Rtf = rtb.Rtf.Replace(str2, "");
                rtb.Rtf = rtb.Rtf.Replace(str, "");
                start = 0;
                num = 0;
                str2 = "[Number]";
                str = "[/Number]";
                while (rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) != -1)
                {
                    start = rtb.Find(str2, start + 2, RichTextBoxFinds.MatchCase) + str2.Length;
                    num = rtb.Find(str, start, RichTextBoxFinds.MatchCase);
                    rtb.Select(start, num - start);
                    rtb.SelectionFont = new Font("Microsoft Sans Serif", 7f);
                }
                rtb.Rtf = rtb.Rtf.Replace(str2, "");
                rtb.Rtf = rtb.Rtf.Replace(str, "");
            }
        }

        private void frmProtokoll_Load(object sender, EventArgs e)
        {
            this.ShowHideButton.Text = "Protokoll anzeigen";
            this.ShowHideButton.Image = Resources.Symbol_Show_Details;
            this.Height = 0xb0;
            this.msgProt.Visible = false;
            this.Collapsed = true;
            MyProject.Computer.Audio.PlaySystemSound(SystemSounds.Asterisk);
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.msgIcon = new PictureBox();
            this.OkButton = new Button();
            this.ShowHideButton = new Button();
            this.msgText = new Label();
            this.msgProt = new RichTextBox();
            ((ISupportInitialize) this.msgIcon).BeginInit();
            this.SuspendLayout();
            this.msgIcon.Image = Resources.Symbol_Info;
            Point point = new Point(12, 12);
            this.msgIcon.Location = point;
            this.msgIcon.Name = "msgIcon";
            Size size = new Size(40, 0x26);
            this.msgIcon.Size = size;
            this.msgIcon.TabIndex = 0;
            this.msgIcon.TabStop = false;
            this.OkButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            point = new Point(0x183, 0x139);
            this.OkButton.Location = point;
            this.OkButton.Name = "OkButton";
            size = new Size(100, 0x19);
            this.OkButton.Size = size;
            this.OkButton.TabIndex = 1;
            this.OkButton.Text = "Ok";
            this.OkButton.UseVisualStyleBackColor = true;
            this.ShowHideButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.ShowHideButton.Image = Resources.Symbol_Show_Details;
            this.ShowHideButton.ImageAlign = ContentAlignment.MiddleRight;
            point = new Point(0xee, 0x139);
            this.ShowHideButton.Location = point;
            this.ShowHideButton.Name = "ShowHideButton";
            size = new Size(0x8f, 0x19);
            this.ShowHideButton.Size = size;
            this.ShowHideButton.TabIndex = 2;
            this.ShowHideButton.Text = "Protokoll anzeigen";
            this.ShowHideButton.UseVisualStyleBackColor = true;
            point = new Point(0x41, 12);
            this.msgText.Location = point;
            this.msgText.Name = "msgText";
            size = new Size(0x1a6, 100);
            this.msgText.Size = size;
            this.msgText.TabIndex = 3;
            this.msgText.Text = "Label1";
            this.msgProt.BackColor = SystemColors.Window;
            this.msgProt.DetectUrls = false;
            this.msgProt.ImeMode = ImeMode.NoControl;
            point = new Point(12, 0x73);
            this.msgProt.Location = point;
            this.msgProt.Name = "msgProt";
            this.msgProt.ReadOnly = true;
            size = new Size(0x1db, 0xc0);
            this.msgProt.Size = size;
            this.msgProt.TabIndex = 4;
            this.msgProt.Text = "";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x1f3, 350);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.msgProt);
            this.Controls.Add(this.msgText);
            this.Controls.Add(this.ShowHideButton);
            this.Controls.Add(this.OkButton);
            this.Controls.Add(this.msgIcon);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "frmProtokoll";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "Einlesen abgeschlossen!";
            ((ISupportInitialize) this.msgIcon).EndInit();
            this.ResumeLayout(false);
        }

        private void OkButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void ShowHideButton_Click(object sender, EventArgs e)
        {
            if (this.Collapsed)
            {
                this.ShowHideButton.Text = "Protokoll ausblenden";
                this.ShowHideButton.Image = Resources.Symbol_Hide_Details;
                this.Height = 0x178;
                this.msgProt.Visible = true;
                this.Collapsed = false;
            }
            else
            {
                this.ShowHideButton.Text = "Protokoll anzeigen";
                this.ShowHideButton.Image = Resources.Symbol_Show_Details;
                this.Height = 0xb0;
                this.msgProt.Visible = false;
                this.Collapsed = true;
            }
        }

        public string MessageIcon
        {
            set
            {
                switch (value)
                {
                    case "Information":
                        this.msgIcon.Image = Resources.Symbol_Info;
                        break;

                    case "Exclamation":
                        this.msgIcon.Image = Resources.Symbol_Exclamation;
                        break;
                }
            }
        }

        public string MessageProt
        {
            set
            {
                this.msgProt.Text = value;
                RichTextBox msgProt = this.msgProt;
                this.FredoCodeFormat(ref msgProt);
                this.msgProt = msgProt;
            }
        }

        public string MessageText
        {
            set
            {
                this.msgText.Text = value;
            }
        }

        internal virtual PictureBox msgIcon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._msgIcon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._msgIcon = value;
            }
        }

        internal virtual RichTextBox msgProt
        {
            [DebuggerNonUserCode]
            get
            {
                return this._msgProt;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._msgProt = value;
            }
        }

        internal virtual Label msgText
        {
            [DebuggerNonUserCode]
            get
            {
                return this._msgText;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._msgText = value;
            }
        }

        internal virtual Button OkButton
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OkButton;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.OkButton_Click);
                if (this._OkButton != null)
                {
                    this._OkButton.Click -= handler;
                }
                this._OkButton = value;
                if (this._OkButton != null)
                {
                    this._OkButton.Click += handler;
                }
            }
        }

        internal virtual Button ShowHideButton
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ShowHideButton;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.ShowHideButton_Click);
                if (this._ShowHideButton != null)
                {
                    this._ShowHideButton.Click -= handler;
                }
                this._ShowHideButton = value;
                if (this._ShowHideButton != null)
                {
                    this._ShowHideButton.Click += handler;
                }
            }
        }
    }
}

